(function($){ "use strict"; $('body').waitForImages(function(){ $(window).trigger("rt_images_loaded"); }); })(jQuery); (function($){ "use strict"; $(window).load(function(){ if($(window).width() > 1024){ var header_height="-100"; var navigation_bar=$(".nav_shadow.sticky"); var sticky_wrapper=$('').height(navigation_bar.outerHeight()); if(navigation_bar.length > 0){ sticky_wrapper.insertBefore(navigation_bar); navigation_bar.appendTo(sticky_wrapper); sticky_wrapper.waypoint({ offset: header_height, handler:function(direction){ if(direction==='down'){ $(this).find(".nav_shadow").addClass("stuck fadeInDown animated").removeClass("default_position"); }else{ $(this).find(".nav_shadow").removeClass("stuck fadeInDown animated").addClass("default_position"); }} }); }} }); })(jQuery); (function($){ "use strict"; if(/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)){ $("body").addClass("mobile_device"); }})(jQuery); (function($){ "use strict"; if(! $.fn.rt_parallax_backgrounds){ $.fn.rt_parallax_backgrounds=function(options){ $(this).each(function(){ var row=$(this).parents("div:eq(0)"), row_height=row.outerHeight(), row_width=row.outerWidth(), row_inheight=row.height(), row_paddings=row_height - row_inheight, holder_height=row_height*1.4, holder_width=row_width*1.4, effect=$(this).attr("data-rt-parallax-effect"), direction=$(this).attr("data-rt-parallax-direction"), speed=0.15; if(Modernizr.backgroundsize&&!$("body").hasClass("mobile_device")){ if(effect=="horizontal"){ $(this).css({ "background-image":"url("+$(this).attr("data-rt-background-image")+")", "height":row_height+"px", "width":holder_width+"px" }); }else{ $(this).css({ "background-image":"url("+$(this).attr("data-rt-background-image")+")", "height":holder_height+"px" }); } $(this).waypoint({ triggerOnce: true, offset: function(){ return $(window).height() + row_paddings; }, handler: function(){ var visible_position=$(window).scrollTop(); if(effect=="horizontal"){ $(this).rt_horizontal_parallax_effect({ row_width: row_width, holder_width: holder_width, visible_position: visible_position, speed: speed, direction: direction }); }else{ $(this).rt_vertical_parallax_effect({ row_height: row_height, holder_height: holder_height, visible_position: visible_position, speed: speed, direction: direction }); }} }); }else{ if($("body").hasClass("mobile_device")){ row.css({ "background-image":"url("+$(this).attr("data-rt-background-image")+")", "background-size":"cover", "background-attachment":"scroll", "background-repeat":"no-repeat", "background-position":"center center" }); $(this).remove(); }else{ $(this).css({ "height":row_height+"px"}); $(this).css({ "filter":"progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+$(this).attr("data-rt-background-image")+"', sizingMethod='scale')", "-ms-filter":"progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+$(this).attr("data-rt-background-image")+"', sizingMethod='scale')" }); }} }); } $.fn.rt_horizontal_parallax_effect=function(options){ var $this=$(this), $window=$(window), invisible_part=options["holder_width"] - options["row_width"], start_position=options["direction"]==-1 ? -1 * invisible_part:0; if(start_position!=0) $this.rt_parallax_apply_css(start_position, 0); $(window).scroll(function(event){ var move_rate=(options["visible_position"] - $window.scrollTop()) * options["speed"], xPos=options["direction"]==-1 ? start_position - move_rate:move_rate; if(xPos < -1 * invisible_part) xPos=-1 * invisible_part; if(xPos > 0) xPos=0; $this.rt_parallax_apply_css(xPos, 0); }); } $.fn.rt_vertical_parallax_effect=function(options){ var $this=$(this), $window=$(window), invisible_part=options["holder_height"] - options["row_height"], start_position=options["direction"]==-1 ? -1 * invisible_part:0 ; if(start_position!=0) $this.rt_parallax_apply_css(0, start_position); $(window).scroll(function(event){ var move_rate=(options["visible_position"] - $window.scrollTop()) * options["speed"], yPos=options["direction"]==-1 ? start_position - move_rate:move_rate; if(yPos < -1 * invisible_part) yPos=-1 * invisible_part; if(yPos > 0) yPos=0; $this.rt_parallax_apply_css(0, yPos); }); } $.fn.rt_parallax_apply_css=function(x, y){ var is_rtl=$("body").hasClass("rtl"); x=is_rtl ? -1 * x:x; $(this).css({ "-webkit-transform": "translate("+x+"px, "+y+"px)", "-moz-transform": "translate("+x+"px, "+y+"px)", "-ms-transform": "translate("+x+"px, "+y+"px)", "-o-transform": "translate("+x+"px, "+y+"px)", "transform": "translate("+x+"px, "+y+"px)" }); }} $(window).one('load rt_images_loaded', function(){ if($.fn.rt_parallax_backgrounds){ $('.rt-parallax-background').rt_parallax_backgrounds(); }}); $(window).on('resize', function(){ if($.fn.rt_parallax_backgrounds){ $('.rt-parallax-background').rt_parallax_backgrounds(); }}); })(jQuery); (function($){ "use strict"; $.fn.rt_waypoint=function(group){ var i=1, animate_item=""; if(group=="single"){ animate_item=$(this); }else{ animate_item=$(this).find('[data-rt-animate="animate"]'); } animate_item.each(function(i){ $(this).waypoint({ triggerOnce: true, offset: function(){ return $(window).height()-50; }, handler: function(){ $(this).rt_start_animation(i); }}); }); } $.fn.rt_start_animation=function(i){ var delay=i*0.1, item=$(this), easing=item.attr("data-rt-animation-type"), group=item.attr("data-rt-animation-group"); item.addClass(easing + " animated ").css({'-webkit-animation-delay': (delay)+"s",'-moz-animation-delay': (delay)+"s",'-ms-animation-delay': (delay)+"s",'-o-animation-delay': (delay)+"s",'animation-delay': (delay)+"s"}); } if(rt_theme_params["content_animations"]&&! $("body").hasClass("mobile_device")){ $(window).load(function(){ if($.fn.waypoint){ $('[data-rt-animation-group="group"]').each(function(i){ $(this).rt_waypoint("group"); }); $('[data-rt-animation-group="single"]').each(function(i){ $(this).rt_waypoint("single"); }); }}); if($('.top_content .ls-wp-container').length > 0&&$(window).width() > 1280){ $(".top_content").css({"min-height":$('.top_content .ls-wp-container').css("height")}); } $(window).on('resize', function(){ if($('.top_content .ls-wp-container').length > 0){ $(".top_content").css({"min-height":"auto"}); }}); $('[data-flexfirstslide="true"]').each(function(){ $(this).parents(".flex-container:eq(0)").css({"min-height":$(this).attr("data-sliderminheight")}); }); }})(jQuery); if("undefined"!=typeof jQuery){(function(a){a.imgpreload=function(b,c){c=a.extend({},a.fn.imgpreload.defaults,c instanceof Function?{all:c}:c);if("string"==typeof b){b=new Array(b)}var d=new Array;a.each(b,function(e,f){var g=new Image;var h=f;var i=g;if("string"!=typeof f){h=a(f).attr("src")||a(f).css('background-image').replace(/^url\((?:"|')?(.*)(?:'|")?\)$/mg, "$1");i=f}a(g).bind("load error",function(e){d.push(i);a.data(i,"loaded","error"==e.type?false:true);if(c.each instanceof Function){c.each.call(i)}if(d.length>=b.length&&c.all instanceof Function){c.all.call(d)}a(this).unbind("load error")});g.src=h})};a.fn.imgpreload=function(b){a.imgpreload(this,b);return this};a.fn.imgpreload.defaults={each:null,all:null}})(jQuery)} (function($){ "use strict"; if(! $.fn.rt_imgpreload){ $.fn.rt_imgpreload=function(options){ var holder=$(this); var image=$(this).find("img"); $(holder).addClass("img_loading"); image.imgpreload ({ each: function(){ if($(this).data('loaded')){ holder.removeClass("img_loading").addClass("img_loaded"); }} }); } $(".imgeffect, .featured_image_holder, .product_boxes .featured_image").rt_imgpreload(); }})(jQuery); (function($){ "use strict"; $.fn.rt_retina_logo=function(options){ if(window.devicePixelRatio > 1){ var normal_size_logo=$(this); var retina_logo=$(this).attr("data-retina"); if(! $(this).attr("data-width")){ var orginal_w=normal_size_logo.width(); $(this).attr("data-width",orginal_w); }else{ var orginal_w=$(this).attr("data-width"); } $(this).css({"width":orginal_w}); if(retina_logo!=""){ $(normal_size_logo).imgpreload({ all: function(){ $(this).css({"width":orginal_w}).attr("src", retina_logo); }}); }} }; $(window).on('load resize', function(){ $('#logo img:first-child').rt_retina_logo(); }); })(jQuery); (function($){ "use strict"; var top_level_items=$("#navigation > li.multicolumn"); var column_count=5; top_level_items.each(function(){ column_count=$(this).attr("data-column-size"); var $sub_menu=$(this).find("ul:eq(0)"); $sub_menu.find("ul").removeClass("sub-menu"); if($sub_menu.length >0){ $("
").appendTo($(this)); var $lists=$sub_menu, group; while(( group=$lists.find('> li:lt('+column_count+')').remove()).length){ $('